package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

public class UserCustomerChangeRgt implements Serializable {
    /**
     * 客户变更记录id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long customersId;

    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 信息变更内容
     *
     * @mbg.generated
     */
    private String infoChanDetail;

    /**
     * 信息变更前内容
     *
     * @mbg.generated
     */
    private String infoChanDetailBefore;

    /**
     * 信息变更后内容
     *
     * @mbg.generated
     */
    private String infoChanDetailAfter;

    /**
     * 信息变更时间
     *
     * @mbg.generated
     */
    private Date infoChanTime;

    private static final long serialVersionUID = 1L;

    public Long getCustomersId() {
        return customersId;
    }

    public void setCustomersId(Long customersId) {
        this.customersId = customersId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getInfoChanDetail() {
        return infoChanDetail;
    }

    public void setInfoChanDetail(String infoChanDetail) {
        this.infoChanDetail = infoChanDetail;
    }

    public String getInfoChanDetailBefore() {
        return infoChanDetailBefore;
    }

    public void setInfoChanDetailBefore(String infoChanDetailBefore) {
        this.infoChanDetailBefore = infoChanDetailBefore;
    }

    public String getInfoChanDetailAfter() {
        return infoChanDetailAfter;
    }

    public void setInfoChanDetailAfter(String infoChanDetailAfter) {
        this.infoChanDetailAfter = infoChanDetailAfter;
    }

    public Date getInfoChanTime() {
        return infoChanTime;
    }

    public void setInfoChanTime(Date infoChanTime) {
        this.infoChanTime = infoChanTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", customersId=").append(customersId);
        sb.append(", userId=").append(userId);
        sb.append(", infoChanDetail=").append(infoChanDetail);
        sb.append(", infoChanDetailBefore=").append(infoChanDetailBefore);
        sb.append(", infoChanDetailAfter=").append(infoChanDetailAfter);
        sb.append(", infoChanTime=").append(infoChanTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCustomerChangeRgt other = (UserCustomerChangeRgt) that;
        return (this.getCustomersId() == null ? other.getCustomersId() == null : this.getCustomersId().equals(other.getCustomersId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getInfoChanDetail() == null ? other.getInfoChanDetail() == null : this.getInfoChanDetail().equals(other.getInfoChanDetail()))
            && (this.getInfoChanDetailBefore() == null ? other.getInfoChanDetailBefore() == null : this.getInfoChanDetailBefore().equals(other.getInfoChanDetailBefore()))
            && (this.getInfoChanDetailAfter() == null ? other.getInfoChanDetailAfter() == null : this.getInfoChanDetailAfter().equals(other.getInfoChanDetailAfter()))
            && (this.getInfoChanTime() == null ? other.getInfoChanTime() == null : this.getInfoChanTime().equals(other.getInfoChanTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCustomersId() == null) ? 0 : getCustomersId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getInfoChanDetail() == null) ? 0 : getInfoChanDetail().hashCode());
        result = prime * result + ((getInfoChanDetailBefore() == null) ? 0 : getInfoChanDetailBefore().hashCode());
        result = prime * result + ((getInfoChanDetailAfter() == null) ? 0 : getInfoChanDetailAfter().hashCode());
        result = prime * result + ((getInfoChanTime() == null) ? 0 : getInfoChanTime().hashCode());
        return result;
    }
}